import request from '@/utils/request'

// 查询店铺维护列表
export function listShop(query) {
  return request({
    url: '/amz/shop/list',
    method: 'get',
    params: query
  })
}

// 查询店铺维护详细
export function getShop(shopId) {
  return request({
    url: '/amz/shop/' + shopId,
    method: 'get'
  })
}

// 新增店铺维护
export function addShop(data) {
  return request({
    url: '/amz/shop',
    method: 'post',
    data: data
  })
}

// 修改店铺维护
export function updateShop(data) {
  return request({
    url: '/amz/shop',
    method: 'put',
    data: data
  })
}

// 删除店铺维护
export function delShop(shopId) {
  return request({
    url: '/amz/shop/' + shopId,
    method: 'delete'
  })
}

// 导出店铺维护
export function exportShop(query) {
  return request({
    url: '/amz/shop/export',
    method: 'get',
    params: query
  })
}

//通过用户username获取可绑定的店铺
export function getShopByUsername(userName) {
  return request({
    url: '/amz/shop/getShopByUsername',
    method: 'post',
    data: userName
  })
}
